package com.gx.service.api;

import com.github.tobato.fastdfs.domain.FileInfo;
import com.github.tobato.fastdfs.domain.MateData;
import com.github.tobato.fastdfs.domain.StorePath;
import com.github.tobato.fastdfs.service.FastFileStorageClient;
import com.gx.domain.SysFileDetail;
import com.gx.domain.vo.ImageVo;
import org.springframework.beans.factory.annotation.Autowired;

import java.io.InputStream;
import java.util.List;
import java.util.Set;

public interface FastdfsService {

    StorePath uploadFile(InputStream inputStream, long fileLenth, String fileExtName, Set<MateData> metaDataSet);

    StorePath uploadThumbImage(InputStream inputStream, long fileLenth, String fileExtName, Set<MateData> metaDataSet);

    FileInfo queryFileInfo(String groupName, String filePath);

    void delFile(Long fileDetailId);

    void delFile(String filePath);

    void delFile(String groupName, String filePath);

    String downloadFile(String groupName, String filePath, String fileName);

    StorePath uploadFileAndUpdateFileDetail(InputStream inputStream, String fileName, long fileLenth, String fileExtName, Long containerId, String fileCategory, String description, Set<MateData> metaDataSet);

    StorePath uploadThumbImageAndUpdateFileDetail(InputStream inputStream, long fileLenth, String fileExtName, Set<MateData> metaDataSet);

    FileInfo queryFileInfoByFileDetailId(Long fileDetailId);

    void delFileAndUpdateFileDetailByFileDetailId(Long fileDetailId);

    String downloadFileLByFileDetailId(Long fileDetailId);

    List<SysFileDetail> queryList();

    FastFileStorageClient getStorageClient();

    SysFileDetail queryFileDetail(Long id);

    ImageVo queryImage();
}
